package com.xjh.basestudy.javabase.Collection;

import java.util.HashSet;

public class TestHashSet {
    public static void main(String[] args) {
        HashSet<String > hs = new HashSet<String>();

        //添加元素
        hs.add("hello");
        hs.add("java");
        hs.add("world");
        //遍历
        for(String s : hs){
            System.out.println(s);
        }
    }
}
